ajax谷歌浏览器没缓存,从缓存AJAX请求会导致Chrome(Prevent Chrome from caching AJA |
您所在的位置:网站首页 › ajax 解决浏览器缓存问题是什么 › ajax谷歌浏览器没缓存,从缓存AJAX请求会导致Chrome(Prevent Chrome from caching AJA |
我设置一个应用程序,它可以在Opera和Firefox很棒,但在谷歌浏览器其缓存AJAX请求,并给陈旧的数据! http://gapps.qk.com.au是应用程序。 当Chrome浏览器,它甚至不发送AJAX请求,但在另一个浏览器尝试时它总是AJAX请求并返回数据。 有没有什么方法(阿帕奇/ PHP / HTML / JS),从这样的行为阻止Chrome浏览器? Ajax调用: function sendAjax(action,domain,idelement) { //Create the variables var xmlhttp, tmp, params = "action=" + action + "&domain=" + encodeURIComponent(domain) xmlhttp = new XMLHttpRequest(); //Check to see if AJAX request has been sent xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState === 4 && xmlhttp.status === 200) { $('#'+idelement).html(xmlhttp.responseText); } }; xmlhttp.open("GET", "ajax.php?"+params, true); xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); //console.log(params); xmlhttp.send(params); } sendAjax('gapps','example.com','gapps'); |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |